<div class="categories index">

<h2><?php __('Categories');?></h2>
<?php
$index->setData($categories, $categoryModelAlias);
$CategoryModel = ClassRegistry::getObject($categoryModelAlias);
$indexFields = $CategoryModel->getFields('group','index');
$index->showFields($indexFields);
$index->sortableFields($indexFields);


$index->setAction('View', array('action'=>'view', ":$categoryModelAlias.id"));
$index->setAction('Edit', array('action'=>'edit', ":$categoryModelAlias.id"));
$index->setAction('Delete', array('action'=>'delete', ":$categoryModelAlias.id"),array(),__("Are you sure you want to delete this $displayName?"));

echo $index->display();
?>
</div>

<div class="actions">
	<ul>
		<li><?php echo $html->link(__('New category', true), array('action'=>'add')); ?></li>
	</ul>
</div>
